package com.superitem.school.controller;

import com.superitem.school.pojo.GoodsType;
import com.superitem.school.service.GoodsTypeService;
import com.superitem.school.util.JsonResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("goodstype")
public class GoodsTypeController {

    @Autowired
    private GoodsTypeService goodsTypeService;

    @RequestMapping("show_all_goodstype")
    public JsonResult ShowAllGoodsType(){
        List<GoodsType> result = goodsTypeService.showAllGoodsType();
        return new JsonResult(result);
    }
}
